    var data = window.location.href.split("?")[1].split("=")[1];

    let xhr = new XMLHttpRequest();
    xhr.open("get", "goodsAndShoppingCart/getGoodsList.php?typeId=" + data, true);


    xhr.send();
    xhr.onreadystatechange = function () {
        if (xhr.status == 200 && xhr.readyState == 4) {
            funny(xhr.responseText);
        }
    }

    function funny(restext) {
        let arr = JSON.parse(restext);
        arr.map(function (item, index, arr) {
            let oLi = document.createElement("li");
            oLi.innerHTML = `<div class="box">
                <a href="details.html?id=${item.goodsId}"><img src="${item.goodsImg}" ></a>
                <h6>${item.goodsName}</h6>
                <p class="typee">${item.goodsDesc}</p>
                <p class="pricee">参考价:<span>￥${item.goodsPrice}</span></p>
                <p class="storee">1家电商在售<span class="iconfont icon-xiaoxi"></span>1</p>
                <p class="tatto"><a href="">懒人法宝</a><a href="">大冷藏空间</a></p>
                </div>`
            let oActPage = document.querySelector(".actPage");
            oActPage.appendChild(oLi);
        })
    }


    $(".filterbar ul li").eq(0).css({
        background: '#005aaa',
        color: '#fff',
    })
    $(".filterbar ul li").click(function(){
        $(this).css({
            background: '#005aaa',
            color: '#fff',
        }).siblings().css({
            color: '#000',
            background: '#fff',
        })
    })